#include"Doubly Linked List.h"
void ListTest()
{
	//创建一个节点
	ListNode* plist = ListInit();

	//尾插
	ListPushBack(plist, 1);
	ListPushBack(plist, 2);
	ListPushBack(plist, 3);
	ListPushBack(plist, 4);

	//尾删
	ListPopBack(plist);
	ListPopBack(plist);
	/*ListPopBack(plist);*/

	////头插
	ListPushFront(plist, 7);
	ListPushFront(plist, 8);
	ListPushFront(plist, 9);


	////头删
	/*ListPopFront(plist);
	ListPopFront(plist);
	ListPopFront(plist);*/

	ListNode* pos = ListFind(plist, 7);
	////中间插入
	ListInsert(pos, 6);
	//ListInsert((plist->next->next), 7);
	///*ListInsert(&(plist->next->next), 8);*/
	////中间删除
	ListErase(pos);
	ListPrint(plist);
}
int main()
{
	ListTest();
	return 0;
}